//
//  HKLoginRegisterView.m
//  BaiSiBuDeJie
//
//  Created by 胡锦涛 on 2018/12/2.
//  Copyright © 2018 胡锦涛. All rights reserved.
//

#import "HKLoginRegisterView.h"
@interface HKLoginRegisterView()

@property (weak, nonatomic) IBOutlet UIButton *loginBtn;


@end
@implementation HKLoginRegisterView

+ (instancetype)loginView
{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}

+ (instancetype)registerView
{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
}


- (void)awakeFromNib
{
    [super awakeFromNib];
    UIImage *image = _loginBtn.currentBackgroundImage;
    
    image = [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
    
    // 让按钮背景图片不要被拉伸
    [_loginBtn setBackgroundImage:image forState:UIControlStateNormal];
    
}

@end
